package nowCoder;

import java.util.Scanner;

/**
 * @Auther: zzx
 * @Date: 2024.02.24/2/3
 */
public class HJ37 {
    /*
        1
        1
        1   1
        1   1   1
        2   2   1   1
        3   3   2   1   1
        5   5   3   2   1   1
        可 *2 + 不可
     */
    public static void main(String[] args) {
        Scanner in  = new Scanner(System.in);
        int x = in.nextInt();
        int sum = 1;
        long[] xx = new long[x];
        for (int i = 0; i < x; i++) {
            if (i<2){
                xx[i] = sum;
            }else {
                xx[i] = xx[i-2] * 2 + xx[i-1] - xx[i-2];
            }
        }
        System.out.println(xx[x-1]);
    }
}
